import moment from 'moment'
import constants from '@/common/js/constants'

const formatDate = (date, formatStr) => {
  if (!formatStr) {
    formatStr = constants.DATE_FORMAT.DATE
  }
  return moment(date).format(formatStr)
}

export default {
  formatDate: formatDate
}
